<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,shrink-to-fit=no">
    <title>用户注册界面</title>
    <link th:href="@{/login/css/bootstrap1.css}" rel="stylesheet">
    <script th:src="@{/login/js/bootstrap1.js}"></script>
    <link th:href="@{/login/css/signIn.css}" rel="stylesheet">
</head>
    <body class="text-center">
        <div class="card">
            <form class="row form-signin" action="/register" method="post" style="position: relative">
                <div style="width:100%;text-align:center;">
                    <img class="mb-2"
                         th:src="@{/login/img/login.jpg}"
                         style="width:70px;height:70px;object-fit:cover;display:inline-block;">
                    <!--   img是行内元素所以无法直接调距离居中
                    object-fit:cover 防止变形,<img> 再套一层 100% 宽度的行内块，让 auto 有空间计算-->
                </div>
                <div class="gap-2 mb-1" style="position: absolute;left: 120px">
                    <a class="btn btn-sm btn-outline-secondary" href="/toLogin" th:text="#{login.signIn}"></a>
                </div>
                <h1 class="h3 mb-3 font-weight-normal" th:text="#{login.tip2}"></h1>
                <div class="col-12" style="margin-top: -20px">
                    <label for="username" class="form-label"></label>
                    <input type="text" class="form-control"
                           th:placeholder="#{login.username}" id="username" name="username" required="" autofocus="">
                </div>
                <div class="col-12">
                    <label for="password" class="form-label"></label>
                    <input type="password" class="form-control"
                           th:placeholder="#{login.password}" id="password" name="password" required="">
                </div>
                <div class="col-12 d-flex align-items-center gap-1">
                    <!-- 输入框：去掉圆角右侧，高度紧贴 -->
                    <input type="text" class="form-control rounded-0 rounded-start"
                           th:placeholder="#{login.captcha}" id="captcha" name="captcha" required
                           style="height:38px;font-size:16px;">
                    <div th:text="${captcha}"
                         class="bg-secondary text-white d-flex align-items-center justify-content-center rounded-0 rounded-end"
                         style="height:38px;min-width:80px;font-family:monospace;font-size:20px;line-height: 38px">
                    </div>
                </div>
                <button class="btn btn-lg btn-primary btn-block" type="submit" th:text="#{login.register}" style="margin-top: 10px"></button>
                <p class="mb-1 text-muted" style="margin-top: 5px">© <span th:text="${currentYear}">2018</span>-<span th:text="${currentYear}+1">2019</span></p>
                <div class="d-flex justify-content-center gap-2 mb-1">
                    <a class="btn btn-sm btn-outline-secondary" th:href="@{/toRegister(l='zh_CN')}">中文</a>
                    <a class="btn btn-sm btn-outline-secondary" th:href="@{/toRegister(l='en_US')}">English</a>
                </div>
            </form>
        </div>

    </body>
</html>
